<template>
  <view class="content-body">
    <view class="cu-list menu sm-border bg-gray" >
      <user-one-list v-for="(item,idx) in allUser" :user="item"></user-one-list>
      <view class="text-gray text-center" style="padding-top: 10px">~~我是有底线的~~</view>
    </view>
  </view>
</template>

<script setup lang="ts">
import {ref, onMounted, computed, reactive} from 'vue';
import {myteams,noParentIdAdmin,saveTeamAddSp} from '../../common/api/user'
import {useStore} from "../../common/store";
import UserOneList from "../../components/UserOneList.vue";
const store = useStore();
const userId = computed(() => store.userId)
const list = reactive([])
const allUser = ref([]);
const modalName = ref('');


const hideModal = ()=> {
  modalName.value = ''
}

const gotoShopInfo = (id) => {
  uni.navigateTo({url: `/pages/shop/shopInfo?id=${id}`})
}

const  loadData = async () => {
  const id = userId.value ||0
  // const id = 1
  await myteams(id).then(res => {
    if (res.code == 200) {
      console.log(res.data)
      let data = res.data;
      allUser.value = data;
    }
  })
}

onMounted(()=>{
  loadData()
})
</script>
<style lang="scss" scoped>
.txt-b-b {
  border-bottom: 1px solid #1C1C1C;
}
.title-split {
  padding: 0 !important;
}

.content-body{
  background-color: #f0f0f0;
  color: #333333;
  height: 100vh;
}
</style>

